package bufferedstream;

import java.io.*;

public class Test04 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("count.txt"));
        String s = br.readLine();
        br.close();
        int count = Integer.parseInt(s);
        count++;
        BufferedWriter bw = new BufferedWriter(new FileWriter("count.txt"));
        bw.write(count + "");
        bw.close();
        if(count <= 3){
            System.out.println("这是你第" + count + "次免费使用~");
        }else {
            System.out.println("你三次免费使用已经用完了，请充值vip后再次使用");
        }
    }
}
